<?php defined('BASEPATH') or exit('No direct script access allowed');
class Settle_Log_m extends MY_Model
{
	public function __construct(){
		parent::__construct();
		$this->set_table_name("settle_log");
	}

	public function getByDateRange($fromdate, $todate){
		$sql = "SELECT c.*, l.settle_date, l.action_type FROM `l_settle_log` l INNER JOIN `l_channel` c ON l.channel_id = c.id "
		." \nWHERE settle_date >= ? AND settle_date <= ? ORDER BY settle_date DESC";

		return $this->db->query($sql, array($fromdate, $todate))->result();

	}
}